
function save() {
    http.request("/school.html", "post", null, {
                        name: nameTxt.text.trim()
                    }, postResult)
}

function postResult(ok, body)
{
    if (ok) {
        console.log("body:", body)
        var d = JSON.parse(body)

        if (d.Error) {
            dialog.message(d.Error)
            return
        }

        dialog.message('添加成功')
    }
}

